package com.webtaglib.tags;

import javax.servlet.jsp.tagext.TagSupport;

public class LoopTag extends TagSupport {

	private static final long serialVersionUID = 2800156607372968208L;
	private int times;
	
	public void setTimes(int times) {
		this.times = times;
	}
	public int doStartTag(){
		return EVAL_BODY_INCLUDE;
	}
	public int doAfterBody(){
		if(times>1){
			times--;
			return EVAL_BODY_AGAIN;
		}else{
			return SKIP_BODY;
		}
	}
	
	
	
}
